﻿function ZSModalWindow(modalWindowId) {

    this.clientId = modalWindowId;
    this.onShow = function () { };
    this.onHide = function () { };

    this.show = function (callback) {
        var modal = document.getElementById(this.clientId);
        if (modal != null) { modal.style.display = "block"; }
        if (callback) { callback(); }
        if (this.onShow) { this.onShow(); }
    }

    this.hide = function (callback) {
        var modal = document.getElementById(this.clientId);
        if (modal != null) { modal.style.display = "none"; }
        if (callback) { callback(); }
        if (this.onHide) { this.onHide(); }
    }
}